home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 7: Sunsite / Linux Cubed Series 7 - Sunsite Vol 1.iso / system / news / inn1.000 / inn1.4sec-linux-src.tar / inn / lib / innvers.c < prev    next >
C/C++ Source or Header  |  1992-02-21  |  816b  |  49 lines

  1. /*  $Revision: 1.3 $
  2. **
  3. */
  4. #include <stdio.h>
  5. #include <sys/types.h>
  6. #include "configdata.h"
  7. #include "clibrary.h"
  8. #include "patchlevel.h"
  9.  
  10.     /* Length of string plus trailing space. */
  11. #define S(x)    sizeof(x)
  12.  
  13.     /* Buffer size. */
  14. #define SIZE    S("INN") + S(RELEASE) + 1 + S(PATCHLEVEL) \
  15.         + S(DATE) + 1 + S(LOCAL_STRING) + 1
  16.  
  17.  
  18.  
  19. /*
  20. **  Return the version string.
  21. */
  22. char *
  23. INNVersion()
  24. {
  25.     static char        buff[SIZE + 1];
  26.     register char    *p;
  27.     STRING        q;
  28.  
  29.     if (buff[0] == '\0') {
  30.     p = buff;
  31.     p += strlen(strcpy(p, "INN"));
  32.     *p++ = ' ';
  33.     p += strlen(strcpy(p, RELEASE));
  34.     *p++ = '.';
  35.     p += strlen(strcpy(p, PATCHLEVEL));
  36.     *p++ = ' ';
  37.     p += strlen(strcpy(p, DATE));
  38.     q = LOCAL_STRING;
  39.     if (*q) {
  40.         *p++ = ' ';
  41.         *p++ = '(';
  42.         p += strlen(strcpy(p, q));
  43.         *p++ = ')';
  44.     }
  45.     }
  46.  
  47.     return buff;
  48. }
  49.